package com.springboot.distributed.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Configuration;

/**
 * 事务配置
 *
 * @author supu
 * @date 2019-09-12 14:53
 **/
@Configuration
public class TxConfig implements InitializingBean {
   /* @Autowired
    private ApplicationContext applicationContext;
    @Autowired
    private PlatformTransactionManager ptm;
    @Autowired
    private TransactionAttributeSource tas;
    @Autowired
    private DistributedTransactionHandler distributedTransactionHandler;*/


    @Override
    public void afterPropertiesSet() throws Exception {
        /*BeanFactoryTransactionAttributeSourceAdvisor advisor = (BeanFactoryTransactionAttributeSourceAdvisor)
                applicationContext.getBean("org.springframework.transaction.config.internalTransactionAdvisor");
        DistributedTransactionInterceptor advice = new DistributedTransactionInterceptor(ptm, tas, distributedTransactionHandler);
        advisor.setAdvice(advice);*/
    }
}
